﻿<%@ Page Title="" Language="C#" MasterPageFile="~/CommunalPage.Master" AutoEventWireup="true"
    CodeBehind="BackstageManage.aspx.cs" Inherits="TalentRecruitmentSystem.Pages.BackstageManage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 154px;
        }
        .style2
        {
            width: 274px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="margin-left: 352px">
        <h2>
            后台管理</h2>
    </div>
    <div>
        <table>
            <tr>
                <td rowspan="2" class="style1">
                </td>
                <td>
                    <asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">个人信息管理</asp:LinkButton>
                </td>
                <td class="style2">
                </td>
                <td>
                    <asp:LinkButton ID="LinkButton2" runat="server" onclick="LinkButton2_Click">企业信息管理</asp:LinkButton>
                </td>
            </tr>
        </table>
    </div>
    <div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" 
            CellPadding="3" DataKeyNames="UserID" DataSourceID="SqlDataSource1" 
            CellSpacing="2">
            <Columns>
                <asp:BoundField DataField="UserID" HeaderText="UserID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="UserID" />
                <asp:BoundField DataField="TruthName" HeaderText="真实姓名" 
                    SortExpression="TruthName" />
                <asp:BoundField DataField="Workplace" HeaderText="期望工作地点" 
                    SortExpression="Workplace" />
                <asp:BoundField DataField="Address" HeaderText="现居地" 
                    SortExpression="Address" />
                <asp:BoundField DataField="Phone" HeaderText="电话" SortExpression="Phone" />
                <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                <asp:BoundField DataField="SchoolTag" HeaderText="毕业院校" 
                    SortExpression="SchoolTag" />
                <asp:BoundField DataField="Profession" HeaderText="专业" 
                    SortExpression="Profession" />
                <asp:BoundField DataField="Education" HeaderText="学历" 
                    SortExpression="Education" />
                <asp:BoundField DataField="Workexperience" HeaderText="工作经验" 
                    SortExpression="Workexperience" />
            </Columns>
            <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
            <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
            <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
            <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#FFF1D4" />
            <SortedAscendingHeaderStyle BackColor="#B95C30" />
            <SortedDescendingCellStyle BackColor="#F1E5CE" />
            <SortedDescendingHeaderStyle BackColor="#93451F" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:C:\USERS\LR\DESKTOP\TALENT-RECRUITMENT-SYSTEM\TRUNK\TALENTRECRUITMENTSYSTEM\TALENTRECRUITMENTSYSTEM\APP_DATA\CONCOURSYSTEM.MDFConnectionString %>" 
            
            SelectCommand="SELECT [UserID], [TruthName], [Workplace], [Address], [Phone], [Email], [SchoolTag], [Profession], [Education], [Workexperience] FROM [UserInfo]" DeleteCommand="delete from UserInfo
where UserID=@UserID" UpdateCommand="Update UserInfo
SET UserID=@UserID,TruthName=@TruthName,Workplace=@Workplace,Address=@Address,Phone=@Phone,Email=@Email,SchoolTag=@SchoolTag,Profession=@Profession,Education=@Education,Workexperience=@Workexperience
WHERE(UserID=@UserID)">
            <DeleteParameters>
                <asp:ControlParameter ControlID="GridView1" Name="UserID" 
                    PropertyName="SelectedValue" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:ControlParameter ControlID="GridView1" Name="UserID" 
                    PropertyName="SelectedValue" />
                <asp:Parameter Name="TruthName" />
                <asp:Parameter Name="Workplace" />
                <asp:Parameter Name="Address" />
                <asp:Parameter Name="Phone" />
                <asp:Parameter Name="Email" />
                <asp:Parameter Name="SchoolTag" />
                <asp:Parameter Name="Profession" />
                <asp:Parameter Name="Education" />
                <asp:Parameter Name="Workexperience" />
            </UpdateParameters>
        </asp:SqlDataSource>
    </div>
    <div>

    </div>
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
        BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" 
        CellPadding="3" CellSpacing="2" DataKeyNames="CompanyID" 
        DataSourceID="SqlDataSource2">
        <Columns>
            <asp:BoundField DataField="CompanyID" HeaderText="CompanyID" 
                InsertVisible="False" ReadOnly="True" SortExpression="CompanyID" />
            <asp:BoundField DataField="CompanyName" HeaderText="公司名称" 
                SortExpression="CompanyName" />
            <asp:BoundField DataField="Publishposition" HeaderText="发布职位" 
                SortExpression="Publishposition" />
            <asp:BoundField DataField="Companywebsite" HeaderText="公司网站" 
                SortExpression="Companywebsite" />
            <asp:BoundField DataField="TradebBongTo" HeaderText="所属行业" 
                SortExpression="TradebBongTo" />
            <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
            <asp:BoundField DataField="LinkPhone" HeaderText="联系电话" 
                SortExpression="LinkPhone" />
            <asp:BoundField DataField="WorkPlace" HeaderText="公司所在地" 
                SortExpression="WorkPlace" />
            <asp:CommandField ShowEditButton="True" />
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
        <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
        <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
        <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
        <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#FFF1D4" />
        <SortedAscendingHeaderStyle BackColor="#B95C30" />
        <SortedDescendingCellStyle BackColor="#F1E5CE" />
        <SortedDescendingHeaderStyle BackColor="#93451F" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:C:\USERS\LR\DESKTOP\TALENT-RECRUITMENT-SYSTEM\TRUNK\TALENTRECRUITMENTSYSTEM\TALENTRECRUITMENTSYSTEM\APP_DATA\CONCOURSYSTEM.MDFConnectionString %>" 
        
    SelectCommand="SELECT [CompanyID], [CompanyName], [Publishposition], [Companywebsite], [TradebBongTo], [Email], [LinkPhone], [WorkPlace] FROM [CompanyInfo]" DeleteCommand="delete from CompanyInfo
where CompanyID=@CompanyID" UpdateCommand="Update CompanyInfo
SET CompanyID=@CompanyID,CompanyName=@CompanyName,Publishposition=@Publishposition,Companywebsite=@Companywebsite,TradebBongTo=@TradebBongTo,Email=@Email,LinkPhone=@LinkPhone,WorkPlace=@WorkPlace
WHERE(CompanyID=@CompanyID)">
        <DeleteParameters>
            <asp:ControlParameter ControlID="GridView2" Name="CompanyID" 
                PropertyName="SelectedValue" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:ControlParameter ControlID="GridView2" Name="CompanyID" 
                PropertyName="SelectedValue" />
            <asp:Parameter Name="CompanyName" />
            <asp:Parameter Name="Publishposition" />
            <asp:Parameter Name="Companywebsite" />
            <asp:Parameter Name="TradebBongTo" />
            <asp:Parameter Name="Email" />
            <asp:Parameter Name="LinkPhone" />
            <asp:Parameter Name="WorkPlace" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>
